package com.exam;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@EnableTransactionManagement
@Configuration
//springbootvueApplication已经扫描了mapper无须在这里再次扫描
//@MapperScan("com.exam.mapper")
public class MybatisPlusConfig {
    /**
     * 分页插件，官网文档提供案例
     * https://mybatis.plus/guide/page.html
     * @return
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
